﻿namespace Vinno.WMS.Pack.Core.Entities
{
    /// <summary>
    /// 物料出库
    /// </summary>
    [Description("物料出库")]
    [EntitySchema(TableConstants.WMS, "VINNO")]
    public class MaterialOutStorage : EntityBase<Guid>, ICreationAudited<long>
    {
        /// <summary>
        /// 仓库物料Id
        /// </summary>
        public Guid MaterialId { get; set; }

        ///// <summary>
        ///// 存货编码(IPN号)
        ///// </summary>
        //[Required, StringSize(StringSize.General)]
        //public string SerialNo { get; set; }

        ///// <summary>
        ///// 存货名称
        ///// </summary>
        //[Required, StringSize(StringSize.Name)]
        //public string Name { get; set; }

        ///// <summary>
        ///// 单位
        ///// </summary>
        //[Required]
        //public string Unit { get; set; }

        /// <summary>
        /// 领用数量
        /// </summary>
        public decimal Num { get; set; }

        /// <summary>
        /// 用途
        /// </summary>
        [StringSize(StringSizeType.Data)]
        public string UseTarget { get; set; }

        /// <summary>
        /// 领用项目
        /// </summary>
        public int Project { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [StringSize(StringSizeType.Data)]
        public string Remark { get; set; }

        /// <summary>
        /// 出库申请状态
        /// </summary>
        public OutStorgeStatus Status { get; set; }

        /// <summary>
        /// 获取或设置 创建者编号
        /// </summary>
        [DisplayName("创建者编号")]
        public long? CreatorId { get; set; }

        /// <summary>
        /// 获取或设置 创建时间
        /// </summary>
        [DisplayName("创建时间")]
        public DateTime CreatedTime { get; set; }

        #region 导航属性
        public virtual Material Material { get; set; }

        #endregion
    }
}